<include file="public@header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:url('index')}">生产列表</a></li>
		</ul>
		<form class="well form-inline margin-top-20" method="get" action="{:url('index')}">
			关键字:
			<input type="text" class="form-control" name="keyword" style="width: 200px;"
				   value="{:input('request.keyword/s','')}" placeholder="请输入关键字...">
			<input type="submit" class="btn btn-primary" value="搜索"/>
			<a class="btn btn-danger" href="{:url('index')}">清空</a>
		</form>
		<div class="table-actions">
			<div class="btn-group">
				<if condition="auth_check('add')"><a href="{:url('add')}" class="btn btn-default">生产</a></if>
			</div>
		</div>
		<table class="table table-hover table-bordered margin-top-20">
			<thead>
				<tr>
					<th width="50">ID</th>
					<th>公司名称</th>
					<th>原材料</th>
					<th>辅助材料</th>
					<th>人工</th>
					<th>公摊</th>
					<th>注册时间</th>
					<th>注册类型</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				<foreach name="lists" item="vo">
				<tr>
					<td>{$vo.id}</td>
					<td>{$vo.name}</td>
					<td>{$vo.material}</td>
					<td>{$vo.accessory_material}</td>
					<td>{$vo.manpower}</td>
					<td>{$vo.apportion}</td>
					<td>{$vo.reg_time|date="Y-m-d",###}</td>
					<td>
						<switch name="vo.reg_type">
							<case value="1">内资</case>
							<case value="2">外资</case>
							<case value="3">合资</case>
						</switch>
					</td>
					<td>
						<if condition="auth_check('edit')"><a href="{:url('edit',['id' => $vo['id']])}">编辑 </a></if>
						<if condition="auth_check('conversion')"><a href="{:url('conversion',['id' => $vo['id']])}">转化 </a></if>
						<if condition="auth_check('restore')"><a href="{:url('restore',['id' => $vo['id']])}">还原 </a></if>
					</td>
				</tr>
				</foreach>
			</tbody>
		</table>
		<div class="pagination">{$page}
			<li><a>共计 {$lists->total()} 条</a><li>
				<input class="page" type="text" name="pageNum" value="{$lists->getCurrentPage()}"/>
				<a class="topage" data-url="{$lists->getCurrentPath()}">跳转</a>
			</li></li>
		</div>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
</body>
</html>